import request from '@/utils/request';

// 查询菜单列表
export function systemMenuList(query) {
  return request({
    url: '/system/menu/list',
    method: 'get',
    params: query
  });
}

// 查询菜单（精简)列表
export function listSimpleMenus() {
  return request({
    url: '/system/menu/list-all-simple',
    method: 'get'
  });
}

// 查询菜单详细
export function systemMenuDetail(id) {
  return request({
    url: '/system/menu/get?id=' + id,
    method: 'get'
  });
}

// 新增菜单
export function systemMenuCreate(data) {
  return request({
    url: '/system/menu/create',
    method: 'post',
    data: data
  });
}

// 修改菜单
export function systemMenuUpdate(data) {
  return request({
    url: '/system/menu/update',
    method: 'put',
    data: data
  });
}

// 删除菜单
export function systemMenuDelete(id) {
  return request({
    url: '/system/menu/delete?id=' + id,
    method: 'delete'
  });
}
